package com.neuedu.exception;

public class ExceptionArray {
     
	public static void array(int[] a) throws MyException{
		try {
			   a[5]=23;
			  
			}catch(RuntimeException e) {
				throw new MyException("下标越界异常");
			}
	}  
	
	public static void nullpoint(String str) throws MyException{
		
			if(str==null) {
				throw new MyException("空指针异常");
			}
		
	}
	
}
